package cn.tedu.ex;

public class TestLambda {
    public static void main(String[] args) {
        Inter in = ()->{
                System.out.println("数据保存成功！");
            };
        in.save();

        Inter2 in2 = (int a) -> {
            System.out.println(a);
        };
        in2.delete(20);

        Inter3 in3 = (String a,int b)->{
            return a+b;
        };
        System.out.println(in3.get("蛇皮",100));
    }
}
interface Inter{
    void save();
}
interface Inter2{
    void delete(int id);
}
@FunctionalInterface
interface Inter3{
    String get(String name, int age);
}